﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ScrollingMessageFrame, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.FontFrame, "ScriptType"))

	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ScrollingMessageFrame, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.FontFrame, "Function"))

	_DB:AddCodeHelp("GetCurrentScroll", [=[Returns the message frame's current scroll position]=], [=[GetCurrentScroll()]=])
	_DB:AddCodeHelp("SetMaxLines", [=[Sets the maximum number of messages to be kept in the frame]=], [=[SetMaxLines(maxLines)]=])
	_DB:AddCodeHelp("SetIndentedWordWrap", [=[Sets whether long lines of text are indented when wrapping]=], [=[SetIndentedWordWrap(indent)]=])
	_DB:AddCodeHelp("PageUp", [=[Scrolls the message frame's contents up by one page]=], [=[PageUp()]=])
	_DB:AddCodeHelp("GetInsertMode", [=[Returns the position at which new messages are added to the frame]=], [=[GetInsertMode()]=])
	_DB:AddCodeHelp("SetTimeVisible", [=[Sets the amount of time for which a message remains visible before beginning to fade out]=], [=[SetTimeVisible(time)]=])
	_DB:AddCodeHelp("GetIndentedWordWrap", [=[Returns whether long lines of text are indented when wrapping]=], [=[GetIndentedWordWrap()]=])
	_DB:AddCodeHelp("SetFadeDuration", [=[Sets the duration of the fade-out animation for disappearing messages]=], [=[SetFadeDuration(duration)]=])
	_DB:AddCodeHelp("UpdateColorByID", [=[Updates the color of a set of messages already added to the frame]=], [=[UpdateColorByID(id, red, green, blue)]=])
	_DB:AddCodeHelp("SetScrollOffset", [=[Sets the message frame's scroll position]=], [=[SetScrollOffset(offset)]=])
	_DB:AddCodeHelp("GetHyperlinksEnabled", [=[Returns whether hyperlinks in the frame's text are interactive]=], [=[GetHyperlinksEnabled()]=])
	_DB:AddCodeHelp("AtBottom", [=[Returns whether the message frame is currently scrolled to the bottom of its contents]=], [=[AtBottom()]=])
	_DB:AddCodeHelp("GetFading", [=[Returns whether messages added to the frame automatically fade out after a period of time]=], [=[GetFading()]=])
	_DB:AddCodeHelp("SetFading", [=[Sets whether messages added to the frame automatically fade out after a period of time]=], [=[SetFading(fading)]=])
	_DB:AddCodeHelp("Clear", [=[Removes all messages displayed in the frame]=], [=[Clear()]=])
	_DB:AddCodeHelp("SetHyperlinksEnabled", [=[Enables or disables hyperlink interactivity in the frame]=], [=[SetHyperlinksEnabled(enable)]=])
	_DB:AddCodeHelp("SetInsertMode", [=[Sets the position at which new messages are added to the frame]=], [=[SetInsertMode("position")]=])
	_DB:AddCodeHelp("GetTimeVisible", [=[Returns the amount of time for which a message remains visible before beginning to fade out]=], [=[GetTimeVisible()]=])
	_DB:AddCodeHelp("GetNumLinesDisplayed", [=[Returns the number of lines displayed in the message frame]=], [=[GetNumLinesDisplayed()]=])
	_DB:AddCodeHelp("ScrollToBottom", [=[Scrolls to the bottom of the message frame's contents]=], [=[ScrollToBottom()]=])
	_DB:AddCodeHelp("ScrollUp", [=[Scrolls the message frame's contents up by two lines]=], [=[ScrollUp()]=])
	_DB:AddCodeHelp("GetMaxLines", [=[Returns the maximum number of messages kept in the frame]=], [=[GetMaxLines(maxLines)]=])
	_DB:AddCodeHelp("GetCurrentLine", [=[Returns a number identifying the last message added to the frame]=], [=[GetCurrentLine()]=])
	_DB:AddCodeHelp("ScrollToTop", [=[Scrolls to the top of the message frame's contents]=], [=[ScrollToTop()]=])
	_DB:AddCodeHelp("ScrollDown", [=[Scrolls the message frame's contents down by two lines]=], [=[ScrollDown()]=])
	_DB:AddCodeHelp("AtTop", [=[Returns whether the message frame is currently scrolled to the top of its contents]=], [=[AtTop()]=])
	_DB:AddCodeHelp("PageDown", [=[Scrolls the message frame's contents down by one page]=], [=[PageDown()]=])
	_DB:AddCodeHelp("GetFadeDuration", [=[Returns the duration of the fade-out animation for disappearing messages]=], [=[GetFadeDuration()]=])
	_DB:AddCodeHelp("AddMessage", [=[Adds a message to those listed in the frame]=], [=[AddMessage("text" [, red [, green [, blue [, alpha]]]])]=])
	_DB:AddCodeHelp("GetNumMessages", [=[Returns the number of messages currently kept in the frame's message history]=], [=[GetNumMessages()]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.ScrollingMessageFrame, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.FontFrame, "Property"))

	_DB:AddCodeHelp("Fading", [[whether messages added to the frame automatically fade out after a period of time]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("MaxLines", [[the maximum number of messages to be kept in the frame]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("HyperlinksEnabled", [[whether hyperlinks in the frame's text are interactive]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("FadeDuration", [[the duration of the fade-out animation for disappearing messages]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("InsertMode", [[the position at which new messages are added to the frame]], IGAS:GetPropertyType("InsertMode"))
	_DB:AddCodeHelp("TimeVisible", [[the amount of time for which a message remains visible before beginning to fade out]], IGAS:GetPropertyType("number"))
end
